import { Input } from "antd";
import { ProTable } from "@ant-design/pro-components";
import React from "react";
import LowCodeRenderer, { RendererEngine } from "../../core/Renderer";

export const Preview = ({ request, ...rest }) => {
  const requestServer = (): any => {
    if (request.url) {
      return fetch(request.url);
    }
    return Promise.resolve({data:[]});
  };
  // console.log("ProAAAAAA}{}{Tabel 重新加载", request,columns);
  return (
    <ProTable
      // headerTitle={
      //   headerTitle?.type ? <RendererEngine item={headerTitle} /> : headerTitle
      // }
      //       item={item.props[key]}
      // request={requestServer}
      {...rest}
    />
  );
};
